//
//  CompareTimes.m
//  panduan
//
//  Created by rimi on 16/6/30.
//  Copyright © 2016年 hangge. All rights reserved.
//

#import "CompareTimes.h"

@implementation CompareTimes

+ (BOOL)compareStartDate:(NSString *)startDate stopDate:(NSString *)stopDate {
    NSDate *date = [NSDate date];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    NSDate *startDate2 = [dateFormatter dateFromString:startDate];
    NSDate *stopDate2 = [dateFormatter dateFromString:stopDate];
    if (([date compare:startDate2] == NSOrderedDescending) && ([date compare:stopDate2] == NSOrderedAscending)) {
        return YES;
    }
    return NO;
}


@end
